const Layout = () => import("@/layout/index.vue");

export default [
  {
    path: "/login",
    name: "Login",
    component: () => import("@/views/login/index.vue"),
    meta: {
      title: "登录",
      showLink: false,
      rank: 101
    }
  },
  {
    path: "/register",
    name: "Register",
    component: () => import("@/views/register/index.vue"),
    meta: {
      title: "注册",
      showLink: false
    }
  },
  // {
  //   path: "/home",
  //   name: "home",
  //   component: () => import("@/views/home/index.vue"),
  //   meta: {
  //     title: "首页",
  //     showLink: false,
  //   }
  // },
  {
    path: "/home",
    // redirect: "/home/home",
    component: () => import("@/views/home/index.vue"),
    meta: {
      title: "首页",
      showLink: false
    },
    children: [
      {
        path: "/home/home",
        name: "home_home",
        component: () => import("@/views/home/home.vue")
      },
      {
        path: "/home/about",
        name: "home_about",
        component: () => import("@/views/home/about.vue")
      },
      {
        path: "/home/product",
        name: "home_product",
        component: () => import("@/views/home/product.vue")
      },
      {
        path: "/home/news",
        name: "home_news",
        component: () => import("@/views/home/news.vue")
      },
      {
        path: "/home/contact",
        name: "home_contact",
        component: () => import("@/views/home/contact.vue")
      },
      {
        path: "/home/bulletin",
        name: "home_bulletin",
        component: () => import("@/views/home/bulletin.vue")
      }
    ]
  },
  {
    path: "/redirect",
    component: Layout,
    meta: {
      title: "加载中...",
      showLink: false,
      rank: 102
    },
    children: [
      {
        path: "/redirect/:path(.*)",
        name: "Redirect",
        component: () => import("@/layout/redirect.vue")
      }
    ]
  }
] satisfies Array<RouteConfigsTable>;
